-
Notifications
You must be signed in to change notification settings - Fork 15
UniFFI don't panic on failed lift #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #373 +/- ##
==========================================
- Coverage 74.19% 74.04% -0.16%
==========================================
Files 253 254 +1
Lines 21897 21918 +21
==========================================
- Hits 16247 16229 -18
- Misses 5650 5689 +39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good from the KM perspective.
Co-authored-by: Thomas Avery <[email protected]>
83f3537
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for KM
🎟️ Tracking
📔 Objective
UniFFI uses the
custom_type!
macro to convert request/response types. The request conversion is allowed to fail which should produce an error in the apps, but there are cases where it would produce a panic instead. The cases are:custom_type!
, then UniFFI produces a panic.One way to fix this is to have the
custom_type!
calls returnbitwarden_uniffi::error::BitwardenError
, but this isn't possible as core and crypto can't depend on uniffi due to circular dependency issues.This PR makes the uniffi crate register an error conversion function during client initialization, thanks to the use of a new
uniffi-error
crate. It also updates all the calls tocustom_type!
to use this new error conversion.⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes